package javafeature.classes;

import java.lang.reflect.Modifier;

/**
 * 测试Class的方法
 */
public class TestClass {
    public static void main(String[] args) {
        TestClass c = new TestClass();
        Class<?> cls = c.getClass();
        int i = cls.getModifiers();
        String retval = Modifier.toString(i);
        System.out.println("Class Modifier = " + retval + ", int = " + i);
        PrivateClass pc = c.new PrivateClass();
        i = pc.getClass().getModifiers();
        retval = Modifier.toString(i);
        System.out.println("Class Modifier = " + retval + ", int = " + i);
    }

    private class PrivateClass {
        int test;
    }
}
